package com.tuo51.childcare.repository;

import com.tuo51.childcare.domain.carestore.StoreItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StoreItemRepository extends JpaRepository<StoreItem,String>, JpaSpecificationExecutor<StoreItem> {

    List<StoreItem> findAllByIdIn(List<String> ids);

    StoreItem findFirstByTitleAndChannelIsNullAndDeletedIsFalse(String title);

    StoreItem findFirstByTitleAndChannelAndDeletedIsFalse(String title, String channel);
}
